package asia.lics.web.controller.system;

import asia.lics.common.core.controller.BaseController;
import asia.lics.common.core.page.TableDataInfo;
import asia.lics.system.domain.SysVisit;
import asia.lics.system.service.ISysVisitService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 访问记录Controller
 *
 * @author ss-tutor
 * @date 2024-12-12
 */
@RestController
@RequestMapping("/system/visit")
public class SysVisitController extends BaseController {
    @Autowired
    private ISysVisitService sysVisitService;

    /**
     * 查询访问记录列表
     */
    @PreAuthorize("@ss.hasPermi('system:visit:list')")
    @GetMapping("/list")
    public TableDataInfo list(SysVisit sysVisit) {
        startPage();
        List<SysVisit> list = sysVisitService.selectSysVisitList(sysVisit);
        return getDataTable(list);
    }
}
